<template>
  <view class="package" @click="navTo('Sale/prebook/reservationDetail?id='+item.id+'&userID='+item.driver_id)" v-for="(item) in list" :key='item.id'>
    <view class="space-between">
      <view>
        <text>{{item.real_name}}</text>
        <text v-if="item.driver_mobile" @click="telCall(item.driver_mobile)">·{{item.driver_mobile}}</text>
        <text v-if="item.cart_code">·{{item.cart_code}}</text>
      </view>
      <view :style="{color:item.status=='-1'?'#999':item.status=='0'?'#30D271':'#FFB555'}">{{item.status_text}}</view>
    </view>
    <view class="space-between" style="margin: 10rpx 0px;">
      <view>
        <text>{{item.park}}</text>
        <text style="font-size: 28rpx;color: #666;margin-left: 10rpx;">{{item.plug_name}}</text>
      </view>
      <view>{{item.time}}</view>
    </view>
    <view style="font-size: 28rpx;color: #666;">{{item.address}}</view>
  </view>
</template>

<script setup lang="ts">
  import { navTo } from '@/utils/navigator';
  import { telCall } from '@/utils/copyText';
  const props = defineProps({
    list: {
      type: Array
    },
  });
</script>

<style scoped lang="less">
  .package:nth-of-type(1){
    margin-top: 0px;
  }
</style>